<?php
/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_specials.php 18698 2011-05-04 14:50:06Z wilt $
 */
  $content = "";
  $content .= '<div class="sideBoxContent centeredContent">';
  $specials_box_counter = 0;
  while (!$random_specials_sidebox_product->EOF) {
    $specials_box_counter++;
	$specials_box_price = $currencies->display_price((zen_get_products_actual_price($random_specials_sidebox_product->fields['products_id'])),0);
    $sale_discount = zen_get_products_save($random_specials_sidebox_product->fields['products_id'],1);
    if ($sale_discount!=''){
    	$special_flag = '<span class="index_icon-discount-s">'.$sale_discount.'</span>';
    }else{
    	$special_flag = '';
    }     
    $content .= "\n" . '  <div class="sideBoxContentItem">';
    $content .= '<a href="' . zen_href_link(zen_get_info_page($random_specials_sidebox_product->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($random_specials_sidebox_product->fields['master_categories_id']) . '&products_id=' . $random_specials_sidebox_product->fields['products_id']) . '">'.$special_flag.'<span class="index_icon-specials-s"></span>' . zen_image(DIR_WS_IMAGES . $random_specials_sidebox_product->fields['products_image'], $random_specials_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT).'</a>';
    $content .= '<br /><a href="' . zen_href_link(zen_get_info_page($random_specials_sidebox_product->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($random_specials_sidebox_product->fields['master_categories_id']) . '&products_id=' . $random_specials_sidebox_product->fields['products_id']) . '">' . $random_specials_sidebox_product->fields['products_name'] . '</a><br />';
    $content .= '<div><span class="actual_price">' . $specials_box_price . '</span></div>';
    $content .= '</div>';
    $random_specials_sidebox_product->MoveNextRandom();
  }
  $content .= '</div>' . "\n";
